package cn.itcast.demo01;

import java.io.File;
import java.io.IOException;

public class Demo05File {
    public static void main(String[] args)  {
        show03();
    }

    private static void show03() {
        File f2 =new File("E:\\MyApplication4\\aaa\\aas");
        f2.delete();//删除结尾的文件或文件夹
    }

    private static void show02() {
        File f1 =new File("E:\\MyApplication4\\aaa");
        boolean mkdir = f1.mkdir();//创建单级文件夹
        System.out.println(mkdir);
        File f2 =new File("E:\\MyApplication4\\aaa\\aas");
        f2.mkdirs();
    }

    private static void show01() {
        File f1 =new File("E:\\MyApplication4\\a.txt");
        boolean b1 = false;
        try {
            b1 = f1.createNewFile();
        } catch (IOException e) {


        }
        System.out.println("b1"+b1);

    }
}
